import home from "@/views/home.vue"; //首页
import exchange from "@/views/exchange.vue"; //个人中心
import my from "@/views/my.vue"; //个人中心
import redact from "@/views/my/redact.vue"; //个人信息
import record from "@/views/my/record.vue"; //兑换记录
import myorder from "@/views/my/myorder.vue"; //商城订单
import consumption from "@/views/my/consumption.vue"; //消费明细
import phone from "@/views/phone.vue"; //获取手机号
import prompt from "@/views/prompt.vue"; //消息提醒

export default VueRouter.createRouter({
	history: VueRouter.createWebHashHistory(),
	routes: Object.entries({
		"":my,
		phone,
		home,
		exchange,
		redact,
		consumption,
		record,
		myorder,
		prompt,
	}).map(([path, component]) => ({ path: "/" + path, component })),
});

// export default VueRouter.createRouter({
// 	history: VueRouter.createWebHashHistory(),
// 	routes: [
// 		{
// 			path: "/",
// 			component: home,
// 		},
// 		{
// 			path: "../exchange",
// 			component: exchange,
// 		},
// 		{
// 			path: "my",
// 			component: my,
// 		}
// 	],
// });
